package com.huaxin.hxmoduleworkorder.common.annotation.validation;

import com.huaxin.hxmoduleworkorder.common.validator.InspectionOrderPublishTypeValidator;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.*;

@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = InspectionOrderPublishTypeValidator.class)
public @interface ValidInspectionOrderPublishType {

    String message() default "无效的巡检工单发布类型，允许值：auto, manual";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
